<?php

use yii\helpers\Html;
use yii\helpers\Json;

/* @var $this yii\web\View */
/* @var $model backend\models\Goods */


$progress= Json::decode($progress);
//var_dump($progress);exit;
$total = count($progress);
?>
<style>
    *{margin:0;padding: 0;}
.flowCon{width: 810px;margin: 0 auto;}
.flow{width: 780px;margin: 0 auto;}
ul li{list-style: none;}
.flow li{width: 44px;height: 44px;border-radius:50%;border:2px solid #1abc9c;display: inline-block;position: relative;}
.flow li:after{content: "";display: inline-block;width: 130px;height: 2px; position: absolute;top:20px;left:42px;background-color: #1abc9c;}
.flow li{margin-right: 126px;}
.flow li:last-of-type{margin-right: 0;}
.flow li:last-of-type:after{display: none;}
.flow li span{width: 12px;height: 18px;margin: 15px auto 0 auto;border:1px solid #1abc9c;display: block;}
.flowtxt{margin-top: 20px;overflow:hidden}
.flowtxt span{display: block;font-size: 14px;}
.flowtxt li{width: 18%;height:100%;float:left;margin-right:14px;}
.flowTitle{font-weight: bold;}
.flowRemark{font-weight: 500;}
</style>

<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h4 class="modal-title" id="myModalLabel">审核商品</h4>
</div>
<div class="modal-body">
    <div class="flowCon">
        <ul class="flow">
            <?php

            foreach($progress as $key=>$item){
                ?>
                <li><span></span></li>
            <?php }?>
        </ul>
        <ul class="flowtxt">
            <?php

            foreach($progress as $key=>$item){
                if(strpos($item['status'],",")){
                    $arr=explode(",",$item['status']);
                    $status=$arr[0];
                    $remark=$arr[1];
                }else{
                    $status=$item['status'];
                    $remark='';
                }

                ?>
                <li>
                    <span class="flowTitle"><?=$item['opr']?>：<?=$status?></span>

                    <span class="flowTime"> <?=$item['oprtime']?></span>
                    <span class="flowRemark"><?php if($remark){?>备注：<?=$remark?><?php } ?></span>
                </li>
            <?php }?>
        </ul>
    </div>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
    <!--                <button type="button" class="btn btn-primary">提交更改</button>-->
</div>




<script>

    $(function(){
        $("#progress").on("hidden.bs.modal", function() {
            $(this).removeData("bs.modal");
        });
    });
</script>
